# sifus tests

CXX = g++
CXXFLAGS = -W -Wall -Winline -finline-functions -O3 -I../src
LDFLAGS = -I/usr/local/include -L/usr/local/lib -lcfitsio

OBJECTS = ../src/IFUException.o ../src/FITSException.o ../src/IFUConf.o ../src/IFUMap.o \
	../src/ImageSlice.o ../src/Image.o ../src/ASCIIImage.o ../src/FITSImage.o \
	 ../src/GaussParameters.o test.o

# compila com debug symbols se DEBUG estiver setado
ifeq ($(DEBUG),1)
	DBG = -g2 -ggdb
	CXXFLAGS = -W -Wall -Winline -I../src	
else
	DBG =
endif

# regras

all: test

test: $(OBJECTS)
	$(CXX) $(LDFLAGS) -o $@ $^

gauss: gauss.o
	$(CXX) -o $@ $^ ../src/GaussParameters.o ../src/IFUException.o

clean:
	-@ rm -f test.o test

%.o: %.cxx
	$(CXX) $(CXXFLAGS) $(DBG) -c -o $@ $<
